package com.zhuoshi.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhuoshi.bean.WdHtProject;
import com.zhuoshi.mapper.WdHtProjectMapper;
import com.zhuoshi.service.WdHtProjectService;

/**
 * 
 * @author Alex
 * 关于项目功能模块的的service
 */
@Service
public class WdHtProjectImpl implements WdHtProjectService {
	@Autowired
	WdHtProjectMapper wdHtProjectMapper; 
	/**
	 * 查询以及模糊查询已经存在的项目
	 */
	@Override
	public List<WdHtProject> getAll(WdHtProject wdHtProject) {
		
		return wdHtProjectMapper.selectAll(wdHtProject);
	}
	
	/**
	 * 添加一个
	 */
	@Override
	public int add(WdHtProject wdHtProject) {
		
		return wdHtProjectMapper.insert(wdHtProject);
	}

	@Override
	public int delOne(String projectId) {
		// TODO Auto-generated method stub
		return wdHtProjectMapper.deleteByPrimaryKey(projectId);
	}

	@Override
	public WdHtProject selectOne(String projectId) {
		// TODO Auto-generated method stub
		return wdHtProjectMapper.selectByPrimaryKey(projectId);
	}

	@Override
	public int upOne(WdHtProject wdHtProject) {
		// TODO Auto-generated method stub
		return wdHtProjectMapper.updateByPrimaryKeySelective(wdHtProject);
	}

}
